<template>
    <ul class="news-content-2">
        <li>编号：{{ route.query.id }}</li>
        <li>标题：{{ route.query.title }}</li>
        <li>内容：{{ route.query.content }}</li>
    </ul>
</template>

<script lang="ts" setup name="">
import {useRoute} from 'vue-router'
const route = useRoute()
console.log('@', route)
    // 如果往该组件传 query 参数时传了 id，那么可以通过 route.query.id 拿到
console.log(route.query)
</script>

<style scoped>
.news-content-2{
    list-style: none;
}
</style>